#include <iostream>

using namespace std;
int ret;
int main()
{
    int k; cin >> k;
    int coin = 1;
    for(int i = 1;i <= k;i ++)
    {
        k -= i;
        ret += coin * coin;
        coin++;
    }
    cout << ret + k * coin << endl;
    return 0;
}